package com.qf.service.impl;

import com.qf.dao.EmpDao;
import com.qf.dao.EmpManagerDao;
import com.qf.dao.impl.EmpDaoImpl;
import com.qf.dao.impl.EmpManagerDaoImpl;
import com.qf.entity.Emp;
import com.qf.entity.EmpManager;
import com.qf.service.EmpManagerService;

import java.util.List;

/*
杨威
2021/9/16
19:25
*/
public class EmpManagerServiceImpl implements EmpManagerService {
    EmpManagerDao empManagerDao = new EmpManagerDaoImpl();


    @Override
    public EmpManager selectManagerByName(String userName, String passWord) {
        EmpManager empManager = empManagerDao.selectByName(userName);
        System.out.println("empManagerservice = " + empManager);
        if (empManager != null) {
            if (empManager.getPassWord().equals(passWord)) {
                return empManager;
            }
        }
        return null;
    }


}
